<?php 
include ("../../checkuser.php"); 
include "include/kopf.php";
include "include/menu.php";
$aid = isset($_GET['aid']) ? $_GET['aid'] : "";
echo $aid;
?> 

<!-- Kalenderscript ANfang -->
<link rel="stylesheet" href="scripts/dynCalendar.css" type="text/css" media="screen">
	<script src="scripts/browserSniffer.js" type="text/javascript" language="javascript"></script>
	<script src="scripts/dynCalendar.js" type="text/javascript" language="javascript"></script>
	<script type="text/javascript">
	<!--
		// Calendar callback. When a date is clicked on the calendar
		// this function is called so you can do as you want with it
		function calendarCallback(datum, month, year)
		{
      datum = year + '-' + month + '-' + datum;
			document.forms[0].datum.value = datum;
		}
	// -->
	</script>
<!-- Kalenderscript Ende -->
<!-- Datensatz eingereicht? -->
<?php
include "../../conf.php";
if (isset($_POST['submit']))
{
$sql="INSERT INTO termine (datum, stunde, minute, inhalt, notiz, fid, prio) 
VALUES ('".$_POST['datum']."','".$_POST['stunde']."','".$_POST['minute']."','".$_POST['inhalt']."','".$_POST['notiz']."','".$_POST['fid']."','".$_POST['prio']."')";
$result = mysql_query($sql,$connect);
echo $sql;
?>
  <td>
    <br>Termin wurde eingecheckt<br>
    <a href="termin_an.php">|Neuen Termin anlegen|</a>
  </td> 
<?php
 exit();}
?>
 


<td valign="top">
  <table style="font-family: Verdana,Arial,sans-serif;    
    font-style:       normal;
    font-size:        11px;
    BORDER-TOP:       #A6A6A6 1px solid; 
    BORDER-LEFT:      #A6A6A6 1px solid; 
    BORDER-BOTTOM:    #A6A6A6 1px solid;
    BORDER-RIGHT:     #A6A6A6 1px solid;">
 <form method="post" action="<?php echo $HTTP_SERVER_VARS['PHP_SELF'] ?>">
<tr>
<td colspan="2"><b>Termin anlegen</b></td>
</tr>
    <tr>
      <td>Datum</td><td>
              <input type="text" readonly name="datum" value="<?php echo $datum ?>" style="border: 1px solid black; background-color: dcdcdc; color: #000000;width:120">
<script language="JavaScript" type="text/javascript">
    <!--
    	fooCalendar = new dynCalendar('fooCalendar', 'calendarCallback', 'bilder/');
    //-->
</script>
     Stunde:<select name="stunde" size="1">
      <option value="0">0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
    </select>
    
    Minuten:<select name="minute" size="1">
      <option value="0">00</option>
      <option value="15">15</option>
      <option value="30">30</option>
      <option value="45">45</option>
     </select>
        
      </td>
    </tr>
    <tr>
      <td>Inhalt:</td><td><input name="inhalt" type="text" size="60" maxlength="120"></td>
    </tr>
    <tr>
      <td colspan="2">Notiz:<textarea name="notiz" cols=100 rows=10></textarea> </td>
    </tr>
    <tr>
    
<input name="fid" type="hidden" value="<?php echo $aid ?>">
    
    
    
      <td></td><td><input name="submit" class="Button" type="submit" value=" Absenden "></td>
    </tr>

</td>
</tr>
</table>
</body> 
</html>